package com.huashizhaoxi.lionapp.service.Impl;

import com.huashizhaoxi.lionapp.dao.NoticeMapper;
import com.huashizhaoxi.lionapp.entity.Notice;
import com.huashizhaoxi.lionapp.service.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NoticeServiceImpl implements NoticeService {
    @Autowired
    private NoticeMapper noticeMapper;
    @Override
    public List<Notice> getNoticeByType(int type) {
        return noticeMapper.getNoticeByType(type);
    }

    @Override
    public int addNotice(Notice notice) {
        return noticeMapper.addNotice(notice);
    }

    @Override
    public List<Notice> searchNotice(String keyword) {
        return noticeMapper.searchNotice(keyword);
    }

    @Override
    public List<Notice> getNewNotice() {
        return noticeMapper.getNewNotice();
    }
}
